package com.hejing.object类.Object类之equals方法;

/**
 * ClassName: CustomerTest
 * Package: com.hejing.object类.Object类之equals方法
 * Description:
 *
 * @Author: HeJing
 * @Create: 2023-03-26 22:41
 * @Version: 1.0
 */
public class CustomerTest {
    public static void main(String[] args) {
        Customer c1 = new Customer("Tom", 12, new Account(2000));
        Customer c2 = new Customer("Tom", 12, new Account(2000));

        System.out.println(c1.equals(c2));  // 没有重写equals()之前: false  重写了equals()方法之后
    }
}
























